/**
 * @Phone.java  COPYRIGHT xiaojian
 * 
 * Created on 2019年8月15日 上午9:17:42
 */
package xj.toolkit.bean.bytebean;

import org.apache.commons.lang3.builder.ToStringBuilder;

import xj.toolkit.bean.bytebean.annotation.ByteBeanField;

/**
 * @author <a href="mailto:cxj2000@gmail.com">xiaojian.cao</a>
 *
 */
public class Phone {
	
	@ByteBeanField(index = 0)
	public int modelLen = 3;
	
	/**
	 * 类型 
	 */
	@ByteBeanField(index = 1, lenField = "modelLen")
	public String model = "p30";
	
	/**
	 * 重量。
	 */
	@ByteBeanField(index = 2)
	public int weight = 125;
	
	@ByteBeanField(index = 3)
	public Screen screen = new Screen();
	
	@ByteBeanField(index = 4)
	public int camerasLen = 1;
	
	@ByteBeanField(index = 5, lenField = "camerasLen")
	public Camera[] cameras;
	
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
}
